#! /usr/bin/env python
#coding=GBK
import math, math3d, t_function

def angle360(o, s, e):
	if t_function.postionsame(o, s) or t_function.postionsame(o, e) or t_function.postionsame(s, e):
		return

	rotate = t_function.angle(o, s, e)
	dir = math3d.vector2(e[0], e[1]) - math3d.vector2(s[0], s[1])
	dir.normalize(1)
	x = 0
	y = 0
	if dir.x < 0:
		rotate = 360 - rotate
	return rotate * math.pi/180
